# 最小版本
cmake_minimum_required(VERSION 3.4.1)
project("Whiteboard")

# 支持gnu++17
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")

# 引入所有文件
file(GLOB src-files
        ${CMAKE_SOURCE_DIR}/cpp/*.cpp
)

# 设置为动态库命令
add_library(
        native-lib
        SHARED
        ${src-files}
)

# 引入库的头文件
include_directories("${CMAKE_SOURCE_DIR}/cpp/anglelib")
# 添加动态库
add_library(anglelib SHARED IMPORTED)
set_target_properties(anglelib PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/${ANDROID_ABI}/libAngleLib.so)

add_library(sared SHARED IMPORTED)
set_target_properties(sared PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/jniLibs/${ANDROID_ABI}/libc++_shared.so)
message("路径：" + "${CMAKE_SOURCE_DIR}/jniLibs/${ANDROID_ABI}/libc++_shared.so")

# 链接三方库
target_link_libraries(
        native-lib
        sared
        anglelib
        log
        -landroid
)

